export const SearchPageApi = {
    async requestInitSearchPageData() {
        return await (await fetch('/tools/initSearchPage')).json();
    },
    async dataList(param) {
        return await (await fetch('/tools/dataList', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            body: JSON.stringify(param)
        })).json();
    },

    async searchMenuInit(param) {
        return await (await fetch('/tools/searchMenuInit', {
            method: 'POST',
            headers: {
                'Content-Type': 'application/json',
            },
            body: JSON.stringify(param)
        })).json();
    },

    async requestDetail(itemValue, id) {
        return await (await fetch('/tools/requestDetail/' + itemValue + "/" + id)).json();
    }
}